﻿using System;
using fastCSharp;

namespace diantou.web.management
{
    /// <summary>
    /// 统计
    /// </summary>
    [fastCSharp.code.cSharp.webView(IsPage = false, IsPool = true)]
    partial class statistics : adminView<statistics> 
    {
        /// <summary>
        /// 当前时间
        /// </summary>
        private DateTime now
        {
            get { return date.NowSecond; }
        }
        /// <summary>
        /// 用户数量
        /// </summary>
        private int userCount
        {
            get
            {
                return diantou.dataAccess.tcpCall.user.count;
            }
        }
        /// <summary>
        /// Email用户数量
        /// </summary>
        private int emailUserCount
        {
            get
            {
                return diantou.dataAccess.tcpCall.user.emailCount;
            }
        }
        /// <summary>
        /// 手机用户数量
        /// </summary>
        private int mobileUserCount
        {
            get { return diantou.dataAccess.tcpCall.user.mobileCount; }
        }
        /// <summary>
        /// 用户关系统计
        /// </summary>
        private int userRelationCount
        {
            get
            {
                return diantou.dataAccess.tcpCall.focusUser.count();
            }
        }
        /// <summary>
        /// 题目数量
        /// </summary>
        private int problemCount
        {
            get
            {
                return diantou.dataAccess.tcpCall.problem.count();
            }
        }
        /// <summary>
        /// 提交数量
        /// </summary>
        private int judgeCount
        {
            get
            {
                return diantou.dataAccess.tcpCall.judge.count();
            }
        }
        /// <summary>
        /// 题目浏览
        /// </summary>
        private int problemBrowseCount
        {
            get
            {
                return diantou.dataAccess.tcpCall.problem.totalBrowseCount;
            }
        }
        /// <summary>
        /// 问题数量
        /// </summary>
        private int questionCount
        {
            get
            {
                return diantou.dataAccess.tcpCall.question.count();
            }
        }
        /// <summary>
        /// 回答数量
        /// </summary>
        private int answerCount
        {
            get
            {
                return diantou.dataAccess.tcpCall.answer.count();
            }
        }
        /// <summary>
        /// 问题浏览
        /// </summary>
        private int questionBrowseCount
        {
            get
            {
                return diantou.dataAccess.tcpCall.question.totalBrowseCount;
            }
        }
        /// <summary>
        /// 教程浏览
        /// </summary>
        private int tutorialBrowseCount
        {
            get
            {
                return diantou.dataAccess.tcpCall.tutorial.totalBrowseCount;
            }
        }
        /// <summary>
        /// 今天活跃用户数量
        /// </summary>
        private int todayUserCount
        {
            get
            {
                return diantou.dataAccess.tcpCall.user.getDateUserCount(date.NowSecond.toInt());
            }
        }
        /// <summary>
        /// 昨天活跃用户数量
        /// </summary>
        private int yesterdayUserCount
        {
            get
            {
                return diantou.dataAccess.tcpCall.user.getDateUserCount(date.NowSecond.AddDays(-1).toInt());
            }
        }
        /// <summary>
        /// 30天活跃用户数量
        /// </summary>
        private int day30UserCount
        {
            get
            {
                return diantou.dataAccess.tcpCall.user.getDateStartUserCount(date.NowSecond.AddDays(-29).toInt());
            }
        }
        /// <summary>
        /// 点头盾支付总额
        /// </summary>
        private decimal totalPrice
        {
            get
            {
                return (decimal)(long)diantou.dataAccess.tcpCall.payProductOrder.totalPrice / 100;
            }
        }
        /// <summary>
        /// 测试数据下载次数
        /// </summary>
        private long testDownloadCount
        {
            get
            {
                return diantou.dataAccess.tcpCall.user.TestDownloadCount;
            }
        }
        /// <summary>
        /// 题解查看次数
        /// </summary>
        private int problemSolutionCount
        {
            get
            {
                return diantou.dataAccess.tcpCall.focusProblem.solutionCount;
            }
        }
    }
}
